import java.io.*;
import java.util.Scanner;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.IOException;

public class ScanConfig {
	
	private String dir;
	private int del;
	
	public String getDir() { return dir; }
	public int getDel() { return del; }
	
	public ScanConfig(String confFileName) throws IOException {
        BufferedReader inputStream = null;
        PrintWriter outputStream = null;

        try {
            inputStream = 
                new BufferedReader(new FileReader(confFileName));
			String l;
			Scanner s;
			String cur;
            while ((l = inputStream.readLine()) != null) {
				s = new Scanner(l);
				if (s.hasNext()) {
					cur = s.next();
					if (cur.equals("dir"))
						dir = s.next();
					else if ((cur.equals("del")) && (s.hasNextInt()))
						del = s.nextInt();
				}
				if (s != null) {
					s.close();
				}
            }
        } finally {
            if (inputStream != null) {
                inputStream.close();
            }
        }
    }
}

